/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xos_filter_a.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#include "../import/head.h"
#include "../settings/head.h"
#include "../impl/head.h"
#include "tools.h"

namespace xos_filter_a
{
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // 

	namespace tools
	{
		int full_config_path_file(char* lpszFullFile, int nBufSize, const char* lpszFile)
		{
			int ret = 0;
			mgr::container()->crt()->strcpy(lpszFullFile, nBufSize, mgr::container()->xos()->exe_path());
			mgr::container()->misc()->path_append( lpszFullFile, nBufSize, settings::get()->config_path.c_str());
			mgr::container()->misc()->path_append( lpszFullFile, nBufSize, lpszFile);
			return ret;
		}

		int full_path( char * lpszFullFile, int nBufSize, const char * lpszFile )
		{
			int ret = 0;
			mgr::container()->crt()->strcpy(lpszFullFile, nBufSize, mgr::container()->xos()->exe_path());
			mgr::container()->misc()->path_append( lpszFullFile, nBufSize, lpszFile );
			return ret;
		}
	}

} // xos_filter_a
